﻿@model IEnumerable<Yunwei.Web.Areas.RRShop.Models.RestaurantIngredientViewModel>

@{
    ViewBag.Title = "List";
}

<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">食材列表</h1>
    </div>
    @*<div class="col-lg-6">
        <a class="btn btn-primary btn-circle" href="/RRShop/Ingredient/Add/@ViewBag.Id"><i class="fa fa-plus"></i></a>
    </div>*@
</div>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Cost)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Stock)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Cost)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Stock)/
            @Html.DisplayFor(modelItem => item.Unit)
        </td>
        <td>
            @Html.ActionLink("编辑", "Edit", new { id = item.Id, rid = item.Restaurant_Id }) |
            @Html.ActionLink("删除", "Delete", new { id=item.Id,rid=item.Restaurant_Id})
        </td>
    </tr>
}

</table>
